abstract class Animal{

    abstract void cry();

    abstract void getAnimaName();

}

class Dog extends Animal{

    void cry() {

        System.out.println("汪汪");

    }

    void getAnimaName() {

        System.out.println("狗狗");

    }

}

class Cat extends Animal{

    void cry() {

        System.out.println("喵喵");

    }

    void getAnimaName() {

        System.out.println("猫猫");

    }

}

class Simulator{

    void playSound(Animal animal) {

        animal.cry();

        animal.getAnimaName();

    }



}



class Ab{

    public static void main(String args[]) {

        Simulator simulator=new Simulator();

        simulator.playSound(new Dog());

        simulator.playSound(new Cat());

    }

}